package com.example.store2.Controller;

import com.example.store2.Service.ClassesService;
import com.example.store2.pojo.Classes;
import com.example.store2.pojo.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController
@RequestMapping("/classes")
public class ClassesController {
    @Autowired
    ClassesService classesService;
    @GetMapping
    public Result getclasses(Integer occupationId){
        log.info("职业id:{}",occupationId);
        List<Classes> classes=classesService.getclasses(occupationId);
        return Result.success(classes);

    }
}
